#ifndef HIGHSCORE_H
#define HIGHSCORE_H

#include <QList>
#include <QWidget>
#include "highscoreitem.h"


class HighScore : public QWidget
{
Q_OBJECT
	
public:
    HighScore();
    ~HighScore();

public:

        void suggestNewHighScore(HighScoreItem& newItem);

private:

        bool queryName(QString name);
        void initHighScores(QList<HighScoreItem>& highScoreList);
        void restoreHighScores(QList<HighScoreItem>& highScoreList);
        void storeHighScores(const QList<HighScoreItem>& highScoreList);

public slots:

	/**
         * Launch high score widget
         */
	void showHighscore();

        /**
          * Reset high scores
          */
        void resetHighScore();

private: //data

        QList<HighScoreItem> m_highScoreList;
        QString m_latestName;

};

#endif // HIGHSCORE
